import {request} from "@/plugins/axios";

const users = '/users2';

export function list(user) {
    return new request({
        url: users + '/getall',
        method:'get',
        params:user
    })
}

export function add(user) {
    return new request({
        url: users + '/add',
        method: 'post',
        data:user
    })
}

export function del(id) {
    return request({
        url:users+'/'+id,
        method:'delete'
    })
}

export function get(id) {
    return request({
        url:`${users}/${id}`,
        method:'get',
    })
}

export function update(user) {
    return request({
        url:users,
        method:'put',
        data: user
    })
}
export function gets(user) {
    return request({
        url:users+"/get",
        method:'post',
        data: user
    })
}